package com.testMvc.UserDao;

import com.core.safe.UserToken;

import java.util.ArrayList;
import java.util.List;

public class UserFactory {

    public static User getUser(UserToken userToken) {
        String pass = userToken.getPassword();
        System.out.println("密码:" + pass);
        if (!"123".equals(pass)) {
            return null;
        }
        User user = new User();
        user.setUserid(1l);
        user.setNickname("王宝强");
        user.setLike("爱好和平");
        return user;
    }

    public static List<String> getRescource(Long id) {
        List<String> urls = new ArrayList<>();
        urls.add("/CustAction/getCustList");
        urls.add("/CustAction/login");
        return urls;
    }

    public static List<String> getRole(Long id) {
        List<String> urls = new ArrayList<>();
        urls.add("root");
        return urls;
    }
}
